630J - Divisibility - CodeForces Solution


math number theory *1100

Please click on ads to support us..

Python Code:

print(int(input())//2520)

C++ Code:

#include <iostream> 
#include <vector>
#include <iomanip>
#include <algorithm>
#include <string>
#include <set>
#include <cmath>
#include <limits.h>
#include <map>

#define rep(i, st, n) for(int (i) = (st); (i) < (n); ++(i))
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define nl "\n";
#define fr first;
#define sc second;


using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef string str;
typedef pair < int, int > pii;
typedef vector < int > vi;
typedef vector < vi > vvi;
typedef vector < pii > vpii;
typedef vector < ll > vll;

const int INF = 1e9;

ll sum(vi& a) {
	ll res = 0;
	rep(i, 0, a.size()) res += a[i];
	return res;
}
int mx(vi& a) {
	int ans = -INF;
	rep(i, 0, a.size()) ans = max(ans, a[i]);
	return ans;
 }
int mn(vi& a) {
	int ans = INF;
	rep(i, 0, a.size()) ans = min(ans, a[i]);
	return ans;
}


vvi g;
vi used;

void dfs(int v) {
	used[v] = 1;
	for (int i : g[v]) {
		if (!used[i])
			dfs(i);
	}
}

ll fast_pow(ll a, int p) {
	if (p == 0)
		return 1;
	if (p % 2 != 0)
		return a * fast_pow(a, p - 1);
	ll b = fast_pow(a, p / 2);
	return b * b;
}

ll c(ll n, ll k) {
	ll res = 1;
	rep(i, 0, k) res = (res * (n - i)) / (i + 1);
	return res;
}
void solve() {
	ll n; cin >> n;
	cout << n / 2520;
}

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t; t = 1;
	while (t--) {
		solve();
		cout << nl;
	}
}


Comments

Submit
0 Comments
More Questions

816B - Karen and Coffee
838D - Airplane Arrangements
148B - Escape
847G - University Classes
1110A - Parity
1215B - The Number of Products
604C - Alternative Thinking
1204C - Anna Svyatoslav and Maps
322A - Ciel and Dancing
1689B - Mystic Permutation
1711B - Party
1702D - Not a Cheap String
1714F - Build a Tree and That Is It
1703F - Yet Another Problem About Pairs Satisfying an Inequality
610A - Pasha and Stick
1200A - Hotelier
1091A - New Year and the Christmas Ornament
1352B - Same Parity Summands
1102A - Integer Sequence Dividing
630B - Moore's Law
1004A - Sonya and Hotels
1680B - Robots
1690A - Print a Pedestal (Codeforces logo)
1295A - Display The Number
1077A - Frog Jumping
1714G - Path Prefixes
1369C - RationalLee
289B - Polo the Penguin and Matrix
1716A - 2-3 Moves
1670B - Dorms War